package base.design.test5Prototype.deepClone;

import java.io.Serializable;

/**
 *浅克隆，调用object的克隆方法
 */
public  class ConcretePrototype implements Cloneable, Serializable {
    public ConcretePrototype() {
        System.out.println("构造方法被调用。。。。。。");
    }
    private  Apple apple;

    @Override
    protected ConcretePrototype clone() throws CloneNotSupportedException {
        return (ConcretePrototype)super.clone();
    }

    public Apple getApple() {
        return apple;
    }

    public void setApple(Apple apple) {
        this.apple = apple;
    }
}
